home *** CD-ROM | disk | FTP | other *** search
- * Program REFCHNGE - Allows changing/deleting reference records
- Set exact off
- Store ;
- 'This routine allows changing a reference record and all its keywords.' to INT
- *Store 'CROSSREF - - Reference Change Routine' to INH
- USE
- *Store d+':refindex' to MFILENDX
- *Store d+':REFINDKW' to MFILENX
- *Store d+':REFERNCE' to MFILE
- Select secondary
- Use &MFILENDX index &MFILENDX
- Select primary
- USE &MFILE index &MFILE
- store 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC' to MONTHS
- Store 'X' to INSC
- Store F to updated
- Do while !(INSC)<>'Q'
- Erase
- @ 1,20 say INH
- ? ' ',INT
- ? ' The source reference code is the code of a specific reference article,'
- ? ' as given in the "Reference / Publication INDEX list".'
- ?
- Accept 'Enter the desired source reference code ("Q"=quit)' to INSC
- If !(INSC)<>'Q' .or. len(insc)>1
- Find &INSC
- If #=0
- ? 'Source Code not found in the REFERNCE file.'
- else
- Set colon on
- Store T to updated
- ?
- ? 'TITLE ',title
- ? 'AUTHOR ',author
- ? 'SOURCE ',sourcecode
- ? 'LOCATION ',location
- ?
- Accept ' Delete, or Change? (Enter "D" or "C") ' to ESEL
- Do while !(ESEL)<>'Q' .and. !(ESEL)<>'D' .and. !(ESEL)<>'C' .and. esel<>' '
- Accept ' Illegal entry. Please enter again ' to ESEL
- enddo
- Do case
- Case !(ESEL)='Q' .or. esel=' '
- Store ' ' to INSC
- ? 'No change will be made.'
- Case !(ESEL)='C'
- Set raw off
- Store sourcecode to xsource
- Store T to UPDATED
- Erase
- @ 1,20 say INH
- @ 3,5 say INT
- @ 5,1 say 'TITLE ' get title
- @ 6,1 say 'AUTHOR ' get author
- @ 6,40 say 'SOURCE ' get sourcecode
- @ 7,40 say 'LOCATION' get LOCATION
- @ 8,1 say 'ABSTRACT'
- Store 1 to incntr
- Do while incntr<5
- Store str(incntr,1) to inchr
- If keyw&inchr<>' '
- Store keyw&inchr to keywd&inchr
- else
- Store ' ' to keywd&inchr
- endif
- @ incntr+7,12 get text&inchr
- Store incntr+1 to incntr
- enddo
- @ 17,1 say 'KEYWORDS ' get keyw1
- @ 18,12 get keyw2
- @ 19,12 get keyw3
- @ 20,12 get keyw4
- @ 17,40 get keyw5
- @ 18,40 get keyw6
- @ 19,40 get keyw7
- @ 20,40 get keyw8
- READ
- Store keyw1 to keyword1
- Store keyw2 to keyword2
- Store keyw3 to keyword3
- Store keyw4 to keyword4
- Store keyw5 to keyword5
- Store keyw6 to keyword6
- Store keyw7 to keyword7
- Store keyw8 to keyword8
- Store ' ' to keyword9
- Store 1 to incntr
- Set exact on
- Store sourcecode to sourcex
- Select secondary
- Find &xsource
- Store 'Y' to M
- Store '1' to N
- If # = 0
- Accept 'No keywords found in keyword file with this source code. OK? ' to M
- Store '9' to N
- Store N to NMAX
- GOTO 1
- endif
- If !(M)='Y'
- Do while sourcecode=xsource .and. .not. EOF
- Store str(#,5) to screc&N
- Store keywordndx to keywd&N
- Replace keywordndx with keyword&N
- If N='9'
- DELETE
- else
- If !(M)='Y' .and. keyword&N=' '
- Store N to M
- endif
- If N='8' .and. !(M)='Y'
- Store '9' to M
- endif
- Store N to NMAX
- Store str(val(N)+1,1) to N
- endif
- SKIP
- Do while *
- SKIP
- enddo
- enddo
- If N<>'1'
- Store N to M
- endif
- If !(M)='Y'
- Store '1' to M
- endif
- Store '0' to N
- GOTO &screc1
- ?
- ? ' SOURCE CODE / KEYWORD CHANGES IN THE REFINDKW.NDX FILE'
- ? 'old keyword old source code new keyword new source code'
- ? '----------- --------------- ----------- ---------------'
- Do while N<NMAX
- Store str(val(N)+1,1) to N
- If SCREC&N<>'0'
- Store screc&N to XX
- GOTO &XX
- ? keywd&N,xsource,'||',keywordndx,sourcex
- replace sourcecode with sourcex
- If keywordndx=' '
- Replace sourcecode with '~'+sourcecode
- endif
- endif
- enddo
- Store M to N
- Do while keyword&N<>' ' .and. N<>'9'
- Append blank
- Replace SOURCECODE with sourcex
- Replace keywordndx with keyword&N
- ? ' ',xsource,'||',keywordndx,sourcex
- Store str(val(N)+1,1) to N
- enddo
- endif
- ?
- Select primary
- Set exact off
- Case !(ESEL)='D'
- ?
- ? "DELETED SOURCE:",title,author
- ? 'KEYWORDS: '
- REPLACE SOURCECODE WITH '~ '
- DELETE
- SELECT SECONDARY
- Set exact on
- Find &INSC
- DO while #<>0
- ? ' ',keywordndx
- REPLACE SOURCECODE WITH '~~~'
- REPLACE KEYWORDNDX WITH '~~~'
- DELETE
- STORE T TO UPDATED
- Find &INSC
- ENDDO
- ENDCASE
- Set exact off
- endif
- Accept 'Entry is complete. Press <retn> to continue ' to XX
- endif
- enddo
- USE
- If updated
- Select secondary
- Use &MFILENDX index &MFILENX
- Set talk on
- REINDEX
- Set talk off
- use
- select primary
- endif
- USE
- Release inh,int,mfilendx,updated,months,xx,esel,incntr,inchr,xsource,newkey,M,N
- Release inkey,pubcode1,insc,scode,scode1,scode2,mfilenx,screc1,screc2,screc3
- Release screc4,screc5,screc6,screc7,screc8
- Release keyword1,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7,keyword8
- Release keywd1,keywd2,keywd3,keywd4,keywd5,keywd6,keywd7,keywd8,sourcex,NMAX
- Release keyword9
- RETURN
-
- REF - - Reference Change Routine' to INH
- USE
- *Store d+':refindex' to MFILENDX
- *Store d+':REFINDKW' to MFILENX
- *Store d+':REFERNCE' to MFILE
- Select secondary
- Use &MFILENDX index &MFILENDX
- Select primary
- USE &MFILE index &MFILE
- store 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC' to MONTHS
- Store 'X' to INSC
- Store F to updated